package com.example.component;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Window;
import android.widget.TextView;

import com.example.appcontact.R;

public class LoadingDialogComponent extends Dialog{
	private String status="";
	TextView tvStatus;
	public LoadingDialogComponent(Context context) {
		super(context);
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE); // no title bar
		setContentView(R.layout.p20001_loading_dialog);		
		this.setCanceledOnTouchOutside(false);
		this.setCancelable(false);
		tvStatus = (TextView)findViewById(R.id.tvStatus);
		tvStatus.setText(status);
		
	}
	public void setStatus(String status){
		this.status = status;
	}
	
	public void updateStatus(String status){
		if(tvStatus != null)
			tvStatus.setText(status);
	}
	
	@Override
	public void onBackPressed() {
		
	}
	
}
